#ifndef PENSETTING_H
#define PENSETTING_H

#include <QWidget>
#include <QButtonGroup>

namespace Ui {
class PenSetting;
}

enum PenSize{
    PS_SMALL,
    PS_NORMAL,
    PS_LARGE
};

enum SettingType {
    ST_NORMAL,
    ST_TEXT,
    ST_MOSAIC
};

class PenSetting : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(PenSize size READ size NOTIFY sizeChanged)
    Q_PROPERTY(QColor color READ color NOTIFY colorChanged)

public:
    explicit PenSetting(QWidget *parent = 0);
    ~PenSetting();

    void setSettingType(SettingType st);

    void setDpi(int dp);

    PenSize size() const
    {
        return m_size;
    }

    QColor color() const
    {
        return m_color;
    }

signals:
    void sizeChanged(PenSize size);

    void colorChanged(QColor color);

private:
    Ui::PenSetting *ui;
    QButtonGroup* m_sizeGroup;
    PenSize m_size;
    QColor m_color;
    SettingType m_type;
    int m_dp = 1;
};

#endif // PENSETTING_H
